﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace Brain
{
    public static class TextureUtil
    {
        /// <summary>
        /// Disposes the Texture2D if it's not null
        /// and if it's not been disposed
        /// </summary>
        /// <param name="texture"></param>
        public static void Dispose(Texture2D texture)
        {
            if (texture != null &&
                !texture.IsDisposed)
            {
                texture.Dispose();
            }
        }
    }
}
